<?php
/**
 * Created by PhpStorm.
 * User: Lin
 * Date: 2019/4/9
 * Time: 23:09
 */
namespace IMooc\Database;

use IMooc\Database;

class MySQLi implements Database
{
    protected $coon;
    function connect($host, $user, $passwd, $dbname)
    {
        $coon = mysqli_connect($host, $user, $passwd, $dbname);
        $this->coon = $coon;
    }
    function query($sql)
    {
        $res = mysqli_query($this->coon, $sql);
        return $res;
    }
    function close()
    {
        mysqli_close($this->coon);
    }
}